Skip to content

treewide: Futher improve compile times for clangStdenv builds#13775

Merged
Mic92 merged 5 commits intoNixOS:masterfrom
xokdvium:more-pch
Aug 17, 2025
Merged

treewide: Futher improve compile times for clangStdenv builds#13775
Mic92 merged 5 commits intoNixOS:masterfrom
xokdvium:more-pch

Conversation

@xokdvium
Copy link
Contributor

Motivation

Follow-ups to #13519 and 6ec50ba.

Local builds are significantly faster. For individual components see individual commit messages.

(Before locally)

Command being timed: "ninja"
User time (seconds): 1927.20
System time (seconds): 87.50
Percent of CPU this job got: 2017%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:39.87

(After locally)

Command being timed: "ninja"
User time (seconds): 1642.38
System time (seconds): 72.15
Percent of CPU this job got: 2109%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:21.27

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

(Before)

**** Time summary:
Compilation (61 times):
  Parsing (frontend):          143.2 s
  Codegen & opts (backend):    105.8 s

(After)

**** Time summary:
Compilation (61 times):
  Parsing (frontend):          113.8 s
  Codegen & opts (backend):    111.7 s
(Before)

**** Time summary:
Compilation (14 times):
  Parsing (frontend):           60.1 s
  Codegen & opts (backend):     18.0 s

(After)

**** Time summary:
Compilation (15 times):
  Parsing (frontend):           16.6 s
  Codegen & opts (backend):     17.4 s
(Before)

**** Time summary:
Compilation (30 times):
  Parsing (frontend):           98.2 s
  Codegen & opts (backend):     27.7 s

(After)

**** Time summary:
Compilation (31 times):
  Parsing (frontend):           34.9 s
  Codegen & opts (backend):     28.1 s
(Before)

**** Time summary:
Compilation (17 times):
  Parsing (frontend):           72.3 s
  Codegen & opts (backend):     47.8 s

(After)

Compilation (19 times):
  Parsing (frontend):           27.5 s
  Codegen & opts (backend):     43.8 s
(Before)

**** Time summary:
Compilation (25 times):
  Parsing (frontend):          145.5 s
  Codegen & opts (backend):     65.9 s

(After)

**** Time summary:
Compilation (26 times):
  Parsing (frontend):           39.9 s
  Codegen & opts (backend):     55.1 s
@xokdvium xokdvium added the contributor-experience Developer experience for Nix contributors label Aug 16, 2025
@xokdvium xokdvium requested a review from edolstra as a code owner August 16, 2025 22:20
@github-actions github-actions bot added new-cli Relating to the "nix" command fetching Networking with the outside (non-Nix) world, input locking labels Aug 16, 2025
@Mic92 Mic92 merged commit 723656d into NixOS:master Aug 17, 2025
14 checks passed
@xokdvium xokdvium deleted the more-pch branch August 17, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor-experience Developer experience for Nix contributors fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants